<table class="abuse_reports">
  <thead>
    <tr>
      <th> Developer/Addon </th>
      <th> Application </th>
      <th> Install date </th>
      <th> Install origin / source </th>
      <th> Category </th>
      <th> Date </th>
      <th> Reporter </th>
    </tr>
  </thead>
  {% for report in reports %}
    <thead>
      <tr>
        <td>
          {% if report.user %}
            {% set object_name = report.user|user_link %}
          {% else %}
            {% set object_name = report.addon_name %}
          {% endif %}
          {{ object_name }} {{ report.addon_version }}
        </td>
        <td>
          {{ report.get_application_display() }}
          {{ report.application_version }}
          {{ report.application_locale }}
          {{ report.operating_system }}
          {{ report.operating_system_version }}
        </td>
        <td>
          {% if report.install_date %}
            {% set report_install_date = report.install_date.replace(microsecond=0).isoformat() %}
          {% else %}
            {% set report_install_date = '' %}
          {% endif %}
          {% if report_install_date %}
            <time datetime="{{ report_install_date }}" title="{{ report_install_date }}">{{ report.install_date|timesince }}</time>
          {% endif %}
        </td>
        <td>
          {% if report.addon_install_origin %}
            <em>Origin:</em> {{ report.addon_install_origin }}<br>
          {% endif %}
          {% if report.addon_install_method %}
            <em>Method:</em> {{ report.get_addon_install_method_display() }}<br>
          {% endif %}
          {% if report.addon_install_source %}
            <em>Source:</em> {{ report.get_addon_install_source_display() }}<br>
          {% endif %}
          {% if report.addon_install_source_url %}
            <em>Source URL:</em> {{ report.addon_install_source_url }}<br>
          {% endif %}
        </td>
        <td>{{ report.get_reason_display() }}</td>
        <td>{{ report.created|datetime }}</td>
        <td>
          {% if report.reporter %}
            {% set user_link = report.reporter|user_link %}
          {% else %}
            {% set user_link = "<i>anonymous</i>"|safe %}
          {% endif %}
          {{ user_link }} [{{ report.country_code }}]
        </td>
      </tr>
    </thead>
    {% if report.message %}
    <tbody class="message">
      <tr>
        <td colspan="7">{{ report.message }}</td>
      </tr>
    </tbody>
    {% endif %}
  {% endfor %}
</table>
